<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    // js中普通数据类型:  number string boolean null undefined
    //js中复杂数据类型: object array function

    // 1.变量
    let a = 1;
    console.log(a);

    // 2.常量
    const b = 2;
    console.log(b);
    // b = 11 //常量不能被重新赋值
    // console.log(b);

    // 3.数据类型
    let c = 'hello';
    console.log(c);

    let d = true;
    console.log(d);

    let e = null;
    console.log(e);

    let f = undefined;
    console.log(f);


    let obj = {
      name: 'zhangsan',
      age: 18,
      sex: '男'
    }
    console.log(obj);

    let arr = [1, 2, 3, 4, 5]
    console.log(arr);

    function fn() {
      console.log('hello');
    }

    fn()

    const obj2 = {
      name: 'zhangsan',
      age: 18,
      sex: '男'
    }
    obj2.name = '雷小涛'
    console.log(obj2);
  </script>

  </script>

</body>

</html>